﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.dataaccess.model
{
    public  class ResResult
    {
        /// <summary>
        /// 状态 1:成功,0:失败
        /// </summary>
        public int ResultState { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string ResultMes { get; set; }

        /// <summary>
        /// 返回数据
        /// </summary>
        public dynamic Result { get; set; }

        public ResResult SuccessResult(dynamic resdata=null)
        {
            ResultState = 1;
            ResultMes = "成功";
            Result = resdata;
            return this;
        }

        public ResResult FailResult(string msg)
        {
            ResultState = 0;
            ResultMes = msg;
            return this;
        }
    }

   
}
